C + + Standard Template Library by Ranges *

نویسندگان

  • Norbert Pataki
  • N. Pataki
چکیده

The C++ Standard Template Library (STL) is the most popular library based on the generic programming paradigm. STL is widely-used, because the library is part of the C++ Standard. It consists of many useful generic data structures and generic algorithms, that are fairly irrespective of the used container. Iterators bridge the gap between containers and algorithms. As a result of this layout the complexity of the library is greatly reduced and we can extend the library with new containers and algorithms simultaneously. Iterators introduced many different problems. First, hard to write handcrafted iterators. Some people argue for the range types which can be a superior abstraction. Ranges can be aggregated in a better way. They have better checking abilities. In this paper we present an overview about the differences between ranges and iterators. We examine a set of algorithms with ranges. Creating new range types is also considered.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Simple Generic Library for C

This paper presents Sglib, a C library freely inspired by the Standard Template Library (STL). In opposition to C++, the C language lacks any support for generic programming. Our library results from the idea to create a generic library of reusable algorithms through the C preprocessor.

متن کامل

Programming with the HPC++ Parallel Standard Template Library

We present an overview of the HPC++ Parallel Standard Template Library (PSTL), a parallel version of the C++ Standard Template Library (STL). The PSTL is part of HPC++, a C++ library and language extension framework being developed by the HPC++ consortium as a standard model for portable parallel programming in C++. The PSTL includes distributed versions of the seven STL containers (vector, lis...

متن کامل

Rationale for Adding Hash Tables to the C Standard Template Library

In Hash Tables for the Standard Template Library Barreiro Fraley and Musser propose a restructuring and extension of the STL requirements for associative containers to accommodate hash table implementations This paper gives the rationale for the proposed changes

متن کامل

OmniMark Developer Resources - Etcetera

There are hundreds of template languages in existence. A cursory search of the Web will turn up dozens of stand-alone and library implementations. Most template languages, however, serve as a hidden part of another software system: they can be found in publishing systems, content management systems, word processors, macro and meta-programming engines, and many other places. A well-known but per...

متن کامل

C++ Standard Template Library by template specialized containers

The C++ Standard Template Library is the flagship example for libraries based on the generic programming paradigm. The usage of this library is intended to minimize the number of classical C/C++ errors, but does not warrant bug-free programs. Furthermore, many new kinds of errors may arise from the inaccurate use of the generic programming paradigm, like dereferencing invalid iterators or misun...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2011